package com.tn.rtdata.examples.stockticker.server;

import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;

/**
 * Program entry point.
 */
public class Runner
{
  public static boolean running = true;

  /**
   * Program entry point.
   */
  public static void main(String[] args)
  {
    ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(args);
    applicationContext.start();

    while (running)
    {
      sleep(1000);
    }
  }

  /**
   * Sleeps the calling thread for the specified number of <code>millis</code>.
   */
  private static void sleep(long millis)
  {
    try
    {
      Thread.sleep(millis);
    }
    catch (InterruptedException e)
    {
      //ignore.
    }
  }
}
